sgdk: tile_cache.h Source File

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

tile_cache.h
Go to the documentation of this file.

    00001
    00011 #ifndef _TILE_CACHE_H_
    00012 #define _TILE_CACHE_H_
    00013
    00014
    00015 #include "vdp_tile.h"
    00016
    00017
    00022 typedef enum
    00023 {
    00024     NO_UPLOAD,
    00025     UPLOAD_VINT,
    00026     UPLOAD_NOW
    00027 } TCUpload;
    00028
    00035 typedef struct
    00036 {
    00037     TileSet *tileset;
    00038     u16 index;
    00039 } TCBloc;
    00040
    00047 typedef struct
    00048 {
    00049     u16 startIndex;
    00050     u16 limit;
    00051     u16 current;
    00052     u16 nextFixed;
    00053     u16 nextFlush;
    00054     u16 numBloc;
    00055     TCBloc *blocs;
    00056 } TileCache;
    00057
    00058
    00065 void TC_init();
    00072 void TC_end();
    00073
    00087 void TC_createCache(TileCache *cache, u16 startIndex, u16 size);
    00103 void TC_createCacheEx(TileCache *cache, u16 startIndex, u16 size, u16 numBloc);
    00113 void TC_releaseCache(TileCache *cache);
    00121 void TC_clearCache(TileCache *cache);
    00132 void TC_flushCache(TileCache *cache);
    00133
    00155 s16 TC_alloc(TileCache *cache, TileSet *tileset, TCUpload upload);
    00170 s16 TC_reAlloc(TileCache *cache, TileSet *tileset);
    00171
    00183 void TC_free(TileCache *cache, TileSet *tileset);
    00184
    00198 s16 TC_getTileIndex(TileCache *cache, TileSet *tileset);
    00199
    00209  void TC_uploadAtVBlank(TileSet *tileset, u16 index);
    00210
    00211
    00212 #endif // _TILE_CACHE_H_

All Classes Files Functions Variables Typedefs Enumerations Defines